import java.util.Scanner;

public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        
        String str = String.valueOf(n); //将整数抓换为字符串
        StringBuilder newStr = new StringBuilder();  
        for(int i = str.length()-1; i >=0; i--){
            newStr.append(str.charAt(i));  //使用append方法拼接一个新的字符串
        }
        System.out.println(newStr.toString());
    }
}